<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="deliveryDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='deliveryDetail.heading'/>"/>
</head>

<s:form id="deliveryForm" action="saveDelivery" method="post" validate="true">
    <s:hidden name="delivery.idDelivery" value="%{delivery.idDelivery}"/>

    <s:textfield key="delivery.description" required="true" cssClass="text medium"/>
    <s:textfield key="delivery.quantity" required="true" cssClass="text medium"/>
    <s:textfield key="delivery.date" required="true" cssClass="text medium"/>
    <li class="buttonBar bottom">
        <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
        <c:if test="${not empty delivery.idDelivery}">
            <s:submit cssClass="button" method="delete" key="button.delete" onclick="return confirmDelete('person')" theme="simple"/>
        </c:if>
        <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
    </li>

</s:form>

<script type="text/javascript">
    Form.focusFirstElement($("deliveryForm"));
</script>